package cc.idoone.spring_boot_hello.actuator;

import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;

/**
 * 自定义健康状态检测类
 *
 * @author hemj
 * @since 2017/10/18
 */
@Component
public class AppHealthIndicator implements HealthIndicator {
	@Override
	public Health health() {
		return Health.up()
				.withDetail("status", "success")
				.withDetail("message", "服务正常").build();
	}
}